<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./Template/templateClient.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://java.sun.com/jsf/core">

    <ui:define name="content">
        <f:metadata>
            <f:viewParam name="nodeId" value="#{contentBean.nodeId}" />
        </f:metadata>

        #{bundle.ajouter_node}

        <h:form>
            <p:growl id="legend-error" autoUpdate="false" showDetail="false" sticky="false"/>    
            <h:panelGrid columns="2" cellpadding="10">

                <h:outputLabel value="#{bundle.titre} : "/>
                <p:inputText value="#{nodeManagedBean.titre}" />

                <h:outputLabel value="#{bundle.thematique} : "/>
                <p:selectOneMenu id="thematique" value="#{nodeManagedBean.thematique}">
                    <f:selectItem itemLabel="Département" itemValue="2"/>
                    <f:selectItem itemLabel="Groupe de musique" itemValue="12"/>
                    <f:selectItem itemLabel="Légende" itemValue="5"/>
                    <f:selectItem itemLabel="Lieu" itemValue="3"/>
                    <f:selectItem itemLabel="Monument" itemValue="4"/>
                    <f:selectItem itemLabel="Pays" itemValue="10"/>
                    <f:selectItem itemLabel="Région" itemValue="1"/>
                    <f:selectItem itemLabel="Restaurant" itemValue="9"/>
                    <f:selectItem itemLabel="Thème" itemValue="11"/>
                </p:selectOneMenu>

                <p:commandButton update="legend-error" value="#{bundle.valider}" icon="ui-icon-check" actionListener="#{nodeManagedBean.save()}"/>

            </h:panelGrid>
        </h:form>
    </ui:define>


</ui:composition>
